﻿using System;
using YXShop.Common.TaoBaoAPI;


namespace YXShop.Web.admin.product
{
    public partial class product_detail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string iid = Request.QueryString["iid"].ToString();
                string appkey = Request.QueryString["appkey"].ToString();
                string appsecret = Request.QueryString["appsecret"].ToString();

                WriteInfo(iid, appkey, appsecret);
             
            }

        }

        protected void WriteInfo(string iid, string appkey, string appsecret)
        {
            TopXmlRestClient client= new TopXmlRestClient("http://gw.api.taobao.com/router/rest", appkey,appsecret);
            ItemGetRequest request = new ItemGetRequest();
            request.Fields = "num_iid,desc";
            request.Iid = iid;
            Item it = client.ItemGet(request);
            Response.Write(it.Desc);
        }

    }
}
